//
// NLSESolverWindowController.h
// NLSE Solver, Created by jmpp on 9/2/10.
// $Id: NLSESolverWindowController.h 16 2010-11-03 14:19:32Z jmpalacios $

/**
* =================================================================
* Copyright (C) 2010, Juan Manuel Palacios. All Rights Reserved.
*
* This software project, which includes this module, is licensed
* as described in the file LICENSE, which you should have received
* as part of this distribution, and may be used only according to
* the terms described therein.
*
* =================================================================
**/


#import <Cocoa/Cocoa.h>
#include "ssfm.h"

#define MAIN_WINDOW_NIB_NAME @"NLSESolverWindow"


enum _InputFieldsIndexes
{
    kTimeWidthInput = 0,
    kTimeWindowInput = 1,
    kInputPowerInput = 2,
    kDistanceInput = 3,
    kNumberOfStepsInput = 4,
    kGammaInput = 5,
    kBeta2Input = 6,
    kBeta3Input = 7,
    kAlphaInput = 8,
    kFFTPointsInput = 9
};
typedef NSUInteger InputFieldsIndexes;


@class IntensityTimeDomainView, IntensityFrequencyDomainView, PhaseTimeDomainView, PhaseFrequencyDomainView;

@interface NLSESolverWindowController : NSWindowController <NSWindowDelegate>
{
    NSForm *inputFields;
    NSPopUpButton *inputProfile;
    NSButton *sSEEnabler;
    NSTextField *sSEParameter;
    NSButton *rEEnabler;
    NSTextField *rEParameter;
    
    IntensityTimeDomainView *iTDView;
    IntensityFrequencyDomainView *iFDView;
    PhaseTimeDomainView *pTDView;
    PhaseFrequencyDomainView *pFDView;
    
    // This is completely unused at present. First, I need to learn how to use it, most probably from a secondary thread to be able
    // to update it concurrently. Secondly, I seriously need to learn some of Apple's HIG to be able to place it better in the XIB,
    // currently it looks sooo incredibly bad!!
    NSProgressIndicator *progressBar;
    
    SSFMInput *libInput;
}

@property (assign) IBOutlet NSForm *inputFields;
@property (assign) IBOutlet NSPopUpButton *inputProfile;
@property (assign) IBOutlet NSButton *sSEEnabler;
@property (assign) IBOutlet NSTextField *sSEParameter;
@property (assign) IBOutlet NSButton *rEEnabler;
@property (assign) IBOutlet NSTextField *rEParameter;

@property (assign) IBOutlet IntensityTimeDomainView *iTDView;
@property (assign) IBOutlet IntensityFrequencyDomainView *iFDView;
@property (assign) IBOutlet PhaseTimeDomainView *pTDView;
@property (assign) IBOutlet PhaseFrequencyDomainView *pFDView;

@property (assign) IBOutlet NSProgressIndicator *progressBar;

@property (readonly) SSFMInput *libInput;

- (id) init;
- (void) windowDidLoad;
- (IBAction) enableSelfSteepeningEffect:(id)sender;
- (IBAction) enableRamanEffect:(id)sender;
- (IBAction) clearAllInputs:(id)sender;
- (IBAction) startSimulation:(id)sender;
- (IBAction) clearAllGraphs:(id)sender;
- (void) windowDidResize:(NSNotification *)theNotification;

@end
